<?php
namespace app\common\validate;

use think\Validate;

class Goodtype extends Validate
{
    protected $rule = [
        'id'    => 'require',
        'name'   => 'require',
    ];

    protected $message = [
        'id'  => '请选择分类',
        'title'   => '请输入标题',
        'cost'    => '请输入原价',
        'price'   => '请输入现价',
        'content' => '请输入套餐描述',
        'sort'    => '请输入排序',
        'status'  => '请选择状态',
    ];

    protected $scene = [
        'add'    => ['name','sort','status'],
        'edit'   => ['name'],
        'title'  => ['title'],
        'cost'   => ['cost'],
        'price'  => ['price'],
        'sort'   => ['sort'],
        'status' => ['status'],
    ];
}